<!DOCTYPE html>
<html>
<head>
    <title>技术名称列表</title>
		<#include "/header.html">
    <script src="${request.contextPath}/statics/libs/ajaxupload.js"></script>
    <link rel="stylesheet" href="${request.contextPath}/statics/css/bootstrap-table.min.css">
    <link rel="stylesheet" href="${request.contextPath}/statics/plugins/treegrid/jquery.treegrid.css">
    <script src="${request.contextPath}/statics/libs/bootstrap-table.min.js"></script>
    <script src="${request.contextPath}/statics/plugins/treegrid/jquery.treegrid.min.js"></script>
    <script src="${request.contextPath}/statics/plugins/treegrid/jquery.treegrid.bootstrap3.js"></script>
    <script src="${request.contextPath}/statics/plugins/treegrid/jquery.treegrid.extension.js"></script>
    <script src="${request.contextPath}/statics/plugins/treegrid/tree.table.js"></script>
</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <div class="grid-btn">

            <div class="form-group col-sm-2">
                <input type="text" class="form-control" v-model="search" @keyup.enter="query" placeholder="标题\种类">
            </div>
            <div class="form-group col-sm-2">
                <select  class="form-control" v-model="isOnline" >
                    <option  value="0">未上线</option>
                    <option  value="1">已上线</option>
                </select>
            </div>


            <a class="btn btn-default" @click="query">查询</a>
            <#if shiro.hasPermission("course:course:save")>
            <a class="btn btn-primary" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</a>
            </#if>

			<#if shiro.hasPermission("course:course:update")>
            <a class="btn btn-primary" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
			</#if>
			<#if shiro.hasPermission("course:course:delete")>
            <a class="btn btn-primary" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
			</#if>
        </div>
        <table id="jqGrid"></table>
        <div id="jqGridPager"></div>
    </div>

    <div v-show="!showList" class="panel panel-default">
        <div class="panel-heading">{{title}}</div>
        <form class="form-horizontal">
														                    <div class="form-group">
                        <div class="col-sm-2 control-label">技术名称</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="course.title" placeholder="技术名称"/>
                        </div>
                    </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">所需积分</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="course.integral" placeholder="所需积分"/>
                </div>
            </div>


						<!--<div class="form-group">-->
                        <!--<div class="col-sm-2 control-label">类别</div>-->
                        <!--<div class="col-sm-10">-->
                            <!--<select  class="form-control" v-model="course.type"  name="category" id="category" >-->
                                <!--<option  v-for="(item,index) in typeList"  :value="item.name">{{ item.name }}</option>-->
                            <!--</select>-->
                        <!--</div>-->
                    <!--</div>-->
						<!--<div class="form-group">-->
                        <!--<div class="col-sm-2 control-label">级别</div>-->
                        <!--<div class="col-sm-10">-->
                            <!--<select  class="form-control" v-model="course.level"  >-->
                                <!--<option  v-for="(item,index) in levelList"  :value="item.name">{{ item.name }}</option>-->
                            <!--</select>-->
                        <!--</div>-->
                    <!--</div>-->
            <!--&lt;!&ndash;        <div class="form-group">-->
                        <!--<div class="col-sm-2 control-label">订阅次数</div>-->
                        <!--<div class="col-sm-10">-->
                            <!--<input type="text" class="form-control" v-model="course.subscribeTotal" placeholder="订阅次数"/>-->
                        <!--</div>-->
                    <!--</div>&ndash;&gt;-->
						<!--<div class="form-group">-->
                        <!--<div class="col-sm-2 control-label">方向</div>-->
                        <!--<div class="col-sm-10">-->
                            <!--<select  class="form-control" v-model="course.directionId" >-->
                                <!--<option  v-for="(item,index) in directionList"  :value="item.id">{{ item.name }}</option>-->
                            <!--</select>-->
                        <!--</div>-->
                    <!--</div>-->
                        <!--<div class="form-group">-->
                        <!--<div class="col-sm-2 control-label">技术类别</div>-->
                        <!--<div class="col-sm-10">-->
                            <!--<select  class="form-control" v-model="course.classificationId" >-->
                                <!--<option  v-for="(item,index) in classList"  :value="item.id">{{ item.name }}</option>-->
                            <!--</select>-->
                        <!--</div>-->
                    <!--</div>-->


            <!--<div class="form-group">
                <div class="col-sm-2 control-label">课程分类废</div>
                <div class="col-sm-10">
                    <select  class="form-control" v-model="course.classificationId">
                        <option  v-for="(item,index) in classificaitonList"  :value="item.id">{{ item.name }}</option>
                    </select>
                </div>
            </div>-->
            <div class="form-group">
                <div class="col-sm-2 control-label">课程分类</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" style="cursor:pointer;" :value="course.classificationId" v-model="course.name" @click="menuTree" readonly="readonly" placeholder="一级菜单"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">课程介绍</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="course.introduce" placeholder="课程介绍"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">课程须知</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="course.courseMustKnow" placeholder="课程须知"/>
                </div>
            </div>
            <div class="form-group">
                        <div class="col-sm-2 control-label">负责人</div>
                        <div class="col-sm-10">
                            <select  class="form-control" v-model="course.teacherId" >
                                <option  v-for="(item,index) in teacherList"  :value="item.id">{{ item.username }}</option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-sm-2 control-label">封面图片</div>
                        <div class="col-sm-10">
                            <img id="pic"  width="80px" height="80px">
                            <!--<input class="form-control" type="hidden" v-model="course.coverPath" placeholder="封面图片">-->
                            <!--<input type="text" class="form-control" v-model="course.coverPath" placeholder="封面图片路径"/>-->
                            <a class="btn btn-primary" id="upload"><i class="fa fa-plus"></i>&nbsp;上传文件</a>
                        </div>
                    </div>
							            <div class="form-group">
                <div class="col-sm-2 control-label"></div>
                <input type="button" class="btn btn-primary" @click="saveOrUpdate" value="确定"/>
                &nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
            </div>
        </form>
    </div>
</div>
<!-- 选择菜单 -->
<div id="menuLayer" style="display: none;padding:10px;">
    <ul id="menuTree" class="ztree"></ul>
</div>
<script src="${request.contextPath}/statics/js/modules/course/course.js?_${.now?long}"></script>
</body>
</html>